/**
* @file misc_timing.cpp
* @author Clemens Zangl
* @date 22.05.2012
* @version 0.1
*
* (c) 2012 University of Applied Sciences Karlsruhe
*
* Definition to misc_timing.h
** 
*/


#include "misc/misc_timing.h"


/// global variable to store timing delays
__IO uint32_t TimingDelay = 0;

/**
 * @brief  Inserts a delay time.
 * @param  nTime: specifies the delay time length, in milliseconds.
 * @retval None
 */
void Delay(__IO uint32_t nTime)
{ 
  TimingDelay = nTime;

  while(TimingDelay != 0);
}

/**
 * @brief  Decrements the TimingDelay variable.
 * @param  None
 * @retval None
 */
void TimingDelay_Decrement(void)
{
  if (TimingDelay != 0x00)
  { 
    TimingDelay--;
  }
}
